package foundation.time_assistant;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * 报时助手
 */
public class Main {
    // 　0:zero, 1: one, 2:two, 3:three, 4:four, 5:five, 6:six,
    //   7:seven, 8:eight, 9:nine, 10:ten, 11:eleven, 12:twelve, 13:thirteen,
    //   14:fourteen, 15:fifteen, 16:sixteen, 17:seventeen, 18:eighteen,
    //   19:nineteen, 20:twenty。
    //　　30读作thirty，40读作forty，50读作fifty。
    static Map<Integer, String> map = new HashMap<Integer, String>() {{
        put(0, "zero");
        put(1, "one");
        put(2, "two");
        put(3, "three");
        put(4, "four");
        put(5, "five");
        put(6, "six");
        put(7, "seven");
        put(8, "eight");
        put(9, "nine");
        put(10, "ten");
        put(11, "eleven");
        put(12, "twelve");
        put(13, "thirteen");
        put(14, "fourteen");
        put(15, "fifteen");
        put(16, "sixteen");
        put(17, "seventeen");
        put(18, "eighteen");
        put(19, "nineteen");
        put(20, "twenty");
        put(30, "thirty");
        put(40, "forty");
        put(50, "fifty");
    }};

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int h = sc.nextInt();
        int m = sc.nextInt();
        if (m >= 60) {
            int tmp = m % 60;
            h += tmp;
            m -= tmp * 60;
        }
        StringBuilder res = new StringBuilder();
        if (h > 20) {
            int b = h % 10;
            int a = h - b;
            if (b != 0) {
                if (a != 0) {
                    res.append(map.get(a) + " " + map.get(b) + " ");
                } else {
                    res.append(map.get(b) + " ");
                }
            } else {
                res.append(map.get(a) + " ");
            }
        } else {
            res.append(map.get(h) + " ");
        }

        if (m > 20) {
            int d = m % 10;
            int c = m - d;
            if (d != 0) {
                if (c != 0) {
                    res.append(map.get(c) + " " + map.get(d));
                } else {
                    res.append(map.get(d));
                }
            } else {
                res.append(map.get(c));
            }
        } else {
            if (m == 0) {
                res.append("o'clock");
            } else {
                res.append(map.get(m));
            }
        }

        System.out.println(res.toString());
    }
}
